import Vue from 'vue'
import Router from 'vue-router'

// import Login from './views/Login.vue'
// import NotFound from './views/404.vue'
// import Home from './views/Home.vue'
// import TransactionPairs from './page/transaction-pairs.vue'
// import RobotList from './page/robot-list.vue'
// import AddRobot from './page/addRobot.vue'
// import EntrustRecord from './page/entrust-record.vue'
// import HuobiRecord from './page/huobi-record.vue'
// import ModelList from './page/model-list'

Vue.use(Router)
let routes = [
  {
    path: '/login',
    component: resolve => require(['./views/Login.vue'], resolve),
    name: '',
    hidden: true
  },
  {
    path: '/404',
    component: resolve => require(['./views/404.vue'], resolve),
    name: '',
    hidden: true
  },
  {
    path: '/Home',
    component: resolve => require(['./views/Home.vue'], resolve),
    name: '主页',
    children: [
      {
        path: '/TransactionPairs',
        component: resolve => require(['./page/transaction-pairs.vue'], resolve),
        name: '交易对列表'
      },
      {
        path: '/RobotList',
        component: resolve => require(['./page/robot-list.vue'], resolve),
        name: '机器人列表'
      },
      {
        path: '/StrategyRobot',
        component: resolve => require(['./page/strategyRobot.vue'], resolve),
        name: '机器人列表'
      },
      {
        path: '/addRobot',
        component: resolve => require(['./page/addRobot.vue'], resolve),
        name: '添加机器人（非主流币）'
      },
      {
        path: '/HuobiRecoder',
        component: resolve => require(['./page/huobi-record.vue'], resolve),
        name: '成交记录'
      },
      {
        path: '/SelfRecoder',
        component: resolve => require(['./page/entrust-record.vue'], resolve),
        name: '成交记录'
      },
      {
        path: '/PlCount',
        component: resolve => require(['./page/plCount.vue'], resolve),
        name: '损益统计'
      },
      {
        path: '/ModelList',
        component: resolve => require(['./page/model-list.vue'], resolve),
        name: '模板列表'
      },
      {
        path: '/socket',
        component: resolve => require(['./page/socket.vue'], resolve),
        name: '用户账户信息'
      },
      {
        path: '/changeInEarn',
        component: resolve => require(['./page/changeInEarn.vue'], resolve),
        name: '收益变动统计'
      },
      {
        path: '/balanceStat',
        component: resolve => require(['./page/balanceStat.vue'], resolve),
        name: '余额统计'
      },
      {
        path: '/CapitalAdjustment',
        component: resolve => require(['./page/CapitalAdjustment.vue'], resolve),
        name: '资金调整'
      },
      {
        path: '/',
        redirect: '/TransactionPairs'
      }
    ]
  },
  {
    path: '*',
    hidden: true,
    redirect: { path: '/login' }
  }
]

export default routes
